{% extends 'layout.twig' %}

{% import 'import/form.twig' as form %}

{% block content %}
    {% verbatim %}
	<template v-if="data">
		<div>Your name: {{ data.name }}</div>
		<div>Email: {{ data.email }}</div>
		<div>Message: {{ data.message }}</div>
	</template>
    {% endverbatim %}
    <form action="" method="post">
        {{ form.input('name', 'Your name', '请输入用户名', {class: 'superclass'}) }}
        {{ form.input('email', 'Email', '请输入邮箱') }}
        {{ form.textarea('message', 'Message') }}
        <div class="form-group">
            <button @click.stop.prevent="handleSubmit" type="submit" class="btn btn-primary">Send</button>
        </div>
    </form>
{% endblock %}

{% block js %}
<script src="https://unpkg.zhimg.com/vue@2.7.14/dist/vue.js"></script>
<script src="/assets/js/contact.js"></script>
{% endblock %}
